<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<script>
    const sameNumbers = (data1, data2) => {
        return Array.isArray(data1) && Array.isArray(data2) && data1.filter(v => data2.includes(v)) || '请检查传入值'
    }
    console.log(sameNumbers([1, 5, 6], [2, 6, 7]))
</script>
</body>
</html>
